package cn.com.taiji.oospub.wechat.service.impl;

import cn.com.taiji.oospub.wechat.entity.OrderChildInfo;
import cn.com.taiji.oospub.wechat.mapper.OrderChildInfoMapper;
import cn.com.taiji.oospub.wechat.service.IOrderChildInfoService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 
 * @since 2020-10-28
 */
@Service
public class OrderChildInfoServiceImpl extends ServiceImpl<OrderChildInfoMapper, OrderChildInfo> implements IOrderChildInfoService {
    @Autowired
    private OrderChildInfoMapper orderChildInfoMapper;

    @Override
    public List<OrderChildInfo> listOrderChildInfoByOrderMainId(String id) {
        QueryWrapper<OrderChildInfo> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("order_main_id", id);

        return orderChildInfoMapper.selectList(queryWrapper);
    }
}
